/*package com.hotvoice.android;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.ListActivity;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
import java.io.File;
import java.util.Date;

import com.hotvoice.android.service.CallService;
import com.hotvoice.android.task.NativeTask;
import com.hotvoice.android.task.VoiceRecorderApp;
import com.hotvoice.android.utils.AMRUtil;
import com.hotvoice.android.utils.Settings;

public class MainActivity extends ListActivity
  implements View.OnClickListener
{
  public static final int ABOUT_MENU_ITEM = 4;
  static final int DELETEFILE_ID = 1;
  public static final int FIRST_MENU_ID = 1;
  static final int PLAYFILE_ID = 0;
  public static final int SELECT_GREETING_MENU_ITEM = 5;
  public static final int SETTINGS_MENU_ITEM = 3;
  public static final int STOP_PLAYBACK_MENU_ITEM = 6;
  public static final int VOICEMAIL_MENU_ITEM = 2;
  static String last_file_name;
  static Date last_start_date;
  VoiceRecorderApp app = null;
  String playback_file = null;
  public boolean started = null;

  private void openAboutDialog()
  {
    View localView = LayoutInflater.from(this).inflate(2130903040, null);
    TextView localTextView = (TextView)localView.findViewById(2131230721);
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(this).setTitle("About").setView(localView);
    MainActivity.2 local2 = new MainActivity.2(this);
    localBuilder.setNegativeButton("Close", local2).show();
  }

  public void changeVoiceFile(String paramString)
  {
    String str1 = String.valueOf(VoiceRecorderApp.dataPath);
    String str2 = str1 + "/files/" + "myvoice.pcm";
    AMRUtil.DecodeAMRFile(paramString, str2);
  }

  public void onClick(View paramView)
  {
  }

  public boolean onContextItemSelected(MenuItem paramMenuItem)
  {
    Uri localUri1 = null;
    String str1 = "linenumber";
    String str2 = "filepath";
    AdapterView.AdapterContextMenuInfo localAdapterContextMenuInfo = (AdapterView.AdapterContextMenuInfo)paramMenuItem.getMenuInfo();
    Object localObject = VoiceRecorder.Recorder.CONTENT_URI;
    long l = localAdapterContextMenuInfo.id;
    Uri localUri2 = ContentUris.withAppendedId((Uri)localObject, l);
    localObject = getListAdapter();
    int j = localAdapterContextMenuInfo.position;
    Cursor localCursor = (Cursor)((ListAdapter)localObject).getItem(j);
    if (localCursor == null)
    {
      localObject = null;
      return localObject;
    }
    String str3 = String.valueOf(NativeTask.file_path);
    localObject = new StringBuilder(str3).append("/");
    int k = localCursor.getColumnIndex(str2);
    String str4 = localCursor.getString(k);
    String str5 = str4;
    localObject = localCursor.getColumnIndex(str1);
    String str6 = localCursor.getString(localObject);
    localObject = paramMenuItem.getItemId();
    switch (localObject)
    {
    default:
    case 0:
    case 1:
    }
    while (true)
    {
      localObject = super.onContextItemSelected(paramMenuItem);
      break;
      Intent localIntent = new Intent("android.intent.action.MAIN", localUri1);
      localIntent.setClass(this, PlaybackActivity.class);
      localIntent.putExtra(str2, str5);
      localIntent.putExtra(str1, str6);
      int i = 268435456;
      localIntent.addFlags(i);
      startActivity(localIntent);
      continue;
      File localFile = new File(str5);
      boolean bool = localFile.exists();
      if (bool)
        localFile.delete();
      ContentResolver localContentResolver = getContentResolver();
      localContentResolver.delete(localUri2, localUri1, localUri1);
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    String str1 = null;
    int i = 3;
    int j = 1;
    int k = 0;
    String str2 = "version";
    super.onCreate(paramBundle);
    SharedPreferences localSharedPreferences = getPreferences(k);
    if (localSharedPreferences.getInt(str2, k) < i)
    {
      if (((VoiceRecorderApp)getApplication()).installFiles() == 0)
      {
        AlertDialog.Builder localBuilder = new AlertDialog.Builder(this).setMessage(2131099676);
        MainActivity.1 local1 = new MainActivity.1(this);
        localBuilder.setNegativeButton(17039370, local1).show();
      }
      SharedPreferences.Editor localEditor = localSharedPreferences.edit();
      localEditor.putInt(str2, i);
      localEditor.commit();
      openAboutDialog();
    }
    getListView().setOnCreateContextMenuListener(this);
    Intent localIntent = getIntent();
    if (localIntent.getData() == null)
    {
      Uri localUri1 = VoiceRecorder.Recorder.CONTENT_URI;
      localIntent.setData(localUri1);
    }
    Uri localUri2 = getIntent().getData();
    String[] arrayOfString1 = VoiceRecorder.Recorder.PROJECTION;
    MainActivity localMainActivity1 = this;
    String str3 = str1;
    Cursor localCursor = localMainActivity1.managedQuery(localUri2, arrayOfString1, str1, str3, "_ID DESC");
    String[] arrayOfString2 = new String[j];
    arrayOfString2[k] = "linenumber";
    int[] arrayOfInt = new int[j];
    j[k] = 2131230735;
    MainActivity localMainActivity2 = this;
    MainActivity localMainActivity3 = this;
    MyFileListAdapter localMyFileListAdapter = new MyFileListAdapter(localMainActivity3, 2130903045, localCursor, arrayOfString2, j);
    setListAdapter(localMyFileListAdapter);
  }

  public void onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    paramContextMenu.add(0, 0, 0, 2131099660);
    paramContextMenu.add(0, 1, 1, 2131099661);
    super.onCreateContextMenu(paramContextMenu, paramView, paramContextMenuInfo);
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    SubMenu localSubMenu = paramMenu.addSubMenu(0, 2, 0, 2131099673);
    localSubMenu.setIcon(17301558);
    localSubMenu.add(0, 5, 0, 2131099674);
    localSubMenu.add(0, 6, 1, 2131099675);
    paramMenu.add(0, 3, 0, 2131099672).setIcon(17301577);
    paramMenu.add(0, 4, 0, 2131099671).setIcon(17301569);
    return true;
  }

  protected void onListItemClick(ListView paramListView, View paramView, int paramInt, long paramLong)
  {
    String str1 = "filepath";
    Cursor localCursor = (Cursor)getListAdapter().getItem(paramInt);
    if (localCursor == null);
    while (true)
    {
      return;
      String str2 = String.valueOf(NativeTask.file_path);
      StringBuilder localStringBuilder = new StringBuilder(str2).append("/");
      int i = localCursor.getColumnIndex(str1);
      String str3 = localCursor.getString(i);
      String str4 = str3;
      Intent localIntent = new Intent("android.intent.action.MAIN", null);
      localIntent.setClass(this, PlaybackActivity.class);
      localIntent.putExtra(str1, str4);
      localIntent.addFlags(268435456);
      startActivity(localIntent);
      super.onListItemClick(paramListView, paramView, paramInt, paramLong);
    }
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    boolean bool1 = null;
    Context localContext1 = 1;
    int i = paramMenuItem.getItemId();
    boolean bool2;
    switch (i)
    {
    default:
      bool2 = bool1;
    case 3:
    case 4:
    case 5:
    case 6:
    }
    while (true)
    {
      return bool2;
      Intent localIntent = new Intent("android.intent.action.MAIN", null);
      Context localContext2 = getApplicationContext();
      localIntent.setClass(localContext2, Settings.class);
      startActivity(localIntent);
      localContext2 = localContext1;
      continue;
      openAboutDialog();
      localContext2 = localContext1;
      continue;
      selectVoiceFile();
      localContext2 = localContext1;
      continue;
      CallService.usePlayback = localContext2;
      if (localContext2 != 0)
        NativeTask.stopPlayback();
      paramMenuItem.setVisible(bool1);
      localContext2 = localContext1;
    }
  }

  protected void onStart()
  {
    super.onStart();
  }

  protected void onStop()
  {
    super.onStop();
  }

  public void selectVoiceFile()
  {
    int i = 2131099677;
    int j = 17039370;
    boolean bool = null;
    String str1 = ".amr";
    Object localObject1 = null;
    File localFile = new File("/sdcard/.voicerecorder/voices");
    File[] arrayOfFile;
    Object localObject2;
    if ((localFile.exists()) && (localFile.isDirectory()))
    {
      arrayOfFile = localFile.listFiles();
      localObject2 = null;
      int k = arrayOfFile.length;
      if (localObject2 >= k)
      {
        if (localObject1 != null)
          break label148;
        AlertDialog.Builder localBuilder1 = new AlertDialog.Builder(this);
        AlertDialog.Builder localBuilder2 = localBuilder1.setMessage(i).setCancelable(bool);
        MainActivity.3 local3 = new MainActivity.3(this);
        localBuilder2.setNegativeButton(j, local3);
        localBuilder1.create().show();
      }
    }
    while (true)
    {
      return;
      if (arrayOfFile[localObject2].getName().endsWith(str1))
        localObject1++;
      localObject2++;
      break;
      label148: int m = 0;
      String[] arrayOfString = new String[localObject1];
      localObject2 = null;
      while (true)
      {
        int n = arrayOfFile.length;
        if (localObject2 >= n)
        {
          AlertDialog.Builder localBuilder3 = new AlertDialog.Builder(this);
          localBuilder3.setTitle(2131099678);
          MainActivity.4 local4 = new MainActivity.4(this, arrayOfString);
          localBuilder3.setItems(arrayOfString, local4);
          localBuilder3.create().show();
          break;
        }
        if (arrayOfFile[localObject2].getName().endsWith(str1))
        {
          int i1 = m + 1;
          String str2 = arrayOfFile[localObject2].getName();
          arrayOfString[m] = str2;
          int i2 = i1;
        }
        localObject2++;
      }
      AlertDialog.Builder localBuilder4 = new AlertDialog.Builder(this);
      AlertDialog.Builder localBuilder5 = localBuilder4.setMessage(i).setCancelable(bool);
      MainActivity.5 local5 = new MainActivity.5(this);
      localBuilder5.setNegativeButton(j, local5);
      localBuilder4.create().show();
    }
  }

  class MyFileListAdapter extends SimpleCursorAdapter
  {
    public MyFileListAdapter(Context paramInt, int paramCursor, Cursor paramArrayOfString, String[] paramArrayOfInt, int[] arg6)
    {
    }

    public void bindView(View paramView, Context paramContext, Cursor paramCursor)
    {
      Cursor localCursor1 = paramCursor;
      String str1 = "started_time";
      int i = localCursor1.getColumnIndex(str1);
      Cursor localCursor2 = paramCursor;
      int j = i;
      long l1 = localCursor2.getLong(j);
      Cursor localCursor3 = paramCursor;
      String str2 = "ended_time";
      int k = localCursor3.getColumnIndex(str2);
      Cursor localCursor4 = paramCursor;
      int m = k;
      long l2 = localCursor4.getLong(m);
      Cursor localCursor5 = paramCursor;
      String str3 = "linenumber";
      int n = localCursor5.getColumnIndex(str3);
      Cursor localCursor6 = paramCursor;
      int i1 = n;
      String str4 = localCursor6.getString(i1);
      String str5 = String.valueOf(NativeTask.file_path);
      StringBuilder localStringBuilder1 = new StringBuilder(str5).append("/");
      Cursor localCursor7 = paramCursor;
      String str6 = "filepath";
      int i2 = localCursor7.getColumnIndex(str6);
      Cursor localCursor8 = paramCursor;
      int i3 = i2;
      String str7 = localCursor8.getString(i3);
      String str8 = str7;
      View localView1 = paramView;
      int i4 = 2131230735;
      ((TextView)localView1.findViewById(i4)).setText(str4);
      View localView2 = paramView;
      int i5 = 2131230736;
      TextView localTextView1 = (TextView)localView2.findViewById(i5);
      File localFile = new File(str8);
      TextView localTextView3;
      Object localObject2;
      long l3;
      if (localFile.exists())
      {
        String str9 = localFile.getName();
        TextView localTextView2 = localTextView1;
        String str10 = str9;
        localTextView2.setText(str10);
        View localView3 = paramView;
        int i6 = 2131230734;
        localTextView3 = (TextView)localView3.findViewById(i6);
        Object localObject1;
        l3 = (localObject1 - localObject2) / 1000L;
        if (l3 != 0L)
          break label391;
        TextView localTextView4 = localTextView3;
        String str11 = "0:00";
        localTextView4.setText(str11);
      }
      while (true)
      {
        View localView4 = paramView;
        int i7 = 2131230737;
        TextView localTextView5 = (TextView)localView4.findViewById(i7);
        Date localDate = new Date();
        localDate.setTime(localObject2);
        String str12 = localDate.toLocaleString();
        localTextView5.setText(str12);
        super.bindView(paramView, paramContext, paramCursor);
        return;
        TextView localTextView6 = localTextView1;
        String str13 = "file has been deleted!";
        localTextView6.setText(str13);
        break;
        label391: StringBuilder localStringBuilder2 = new StringBuilder();
        long l4 = l3 / 60L;
        String str14 = l4 + ":";
        if (l3 % 60L < 10L)
        {
          String str15 = String.valueOf(str14);
          str14 = str15 + "0";
        }
        String str16 = String.valueOf(str14);
        StringBuilder localStringBuilder3 = new StringBuilder(str16);
        long l5 = l3 % 60L;
        String str17 = l5;
        localTextView3.setText(str14);
      }
    }
  }
}

 Location:           C:\Documents and Settings\Administrator\桌面\Voicerecorder\classes.dex.dex2jar.jar
 * Qualified Name:     cn.airrunner.voicerecorder.MainActivity
 * JD-Core Version:    0.6.0
 */